package com.tchy.cloud.entity;

import javax.persistence.*;

import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created by xiaoji on 2017/2/20.
 */
@Entity
@Table(name = "a_saysay", schema = "", catalog = "")
public class ASaysayEntity {
    private Long sayId;
    private ATopicEntity topic;
    private String title;
    private String conent;
    private Integer praise;
    private Integer reply;
    private ACustomerEntity customer;
    private Date publishTime;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "say_id")
    public Long getSayId() {
        return sayId;
    }

    public void setSayId(Long sayId) {
        this.sayId = sayId;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "topic_id")
    public ATopicEntity getTopic() {
        return topic;
    }

    public void setTopic(ATopicEntity topic) {
        this.topic = topic;
    }

    @Basic
    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "conent")
    public String getConent() {
        return conent;
    }

    public void setConent(String conent) {
        this.conent = conent;
    }

    @Basic
    @Column(name = "praise")
    public Integer getPraise() {
        return praise;
    }

    public void setPraise(Integer praise) {
        this.praise = praise;
    }

    @Basic
    @Column(name = "reply")
    public Integer getReply() {
        return reply;
    }

    public void setReply(Integer reply) {
        this.reply = reply;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "customer_id")
    public ACustomerEntity getCustomer() {
        return customer;
    }

    public void setCustomer(ACustomerEntity customer) {
        this.customer = customer;
    }

    @Basic
    @Column(name = "publish_time")
    public Date getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(Date publishTime) {
        this.publishTime = publishTime;
    }

}
